﻿using System;
using System.Collections.Generic;
using Character;
using UnityEngine;

// Token: 0x02000176 RID: 374
public abstract class ParamCustomTestBase : MonoBehaviour
{
	// Token: 0x060009B2 RID: 2482
	public abstract Human GetHuman();

	// Token: 0x060009B3 RID: 2483 RVA: 0x00038F04 File Offset: 0x00037104
	protected void SetupAcce()
	{
		List<ParamCustomTestBase.NameAndID> list = new List<ParamCustomTestBase.NameAndID>();
		list.Add(new ParamCustomTestBase.NameAndID("なし", -1));
		list.Add(new ParamCustomTestBase.NameAndID("頭", 0));
		list.Add(new ParamCustomTestBase.NameAndID("耳", 1));
		list.Add(new ParamCustomTestBase.NameAndID("眼", 2));
		list.Add(new ParamCustomTestBase.NameAndID("顔", 3));
		list.Add(new ParamCustomTestBase.NameAndID("首", 4));
		list.Add(new ParamCustomTestBase.NameAndID("肩", 5));
		list.Add(new ParamCustomTestBase.NameAndID("胸", 6));
		list.Add(new ParamCustomTestBase.NameAndID("腰", 7));
		list.Add(new ParamCustomTestBase.NameAndID("背", 8));
		list.Add(new ParamCustomTestBase.NameAndID("腕", 9));
		list.Add(new ParamCustomTestBase.NameAndID("手", 10));
		list.Add(new ParamCustomTestBase.NameAndID("脚", 11));
		this.sel_acceType.Setup(list.ToArray());
		List<ParamCustomTestBase.NameAndID> list2 = new List<ParamCustomTestBase.NameAndID>();
		list2.Add(new ParamCustomTestBase.NameAndID("頭", 0));
		list2.Add(new ParamCustomTestBase.NameAndID("左耳", 2));
		list2.Add(new ParamCustomTestBase.NameAndID("右耳", 3));
		list2.Add(new ParamCustomTestBase.NameAndID("眼鏡", 1));
		list2.Add(new ParamCustomTestBase.NameAndID("鼻", 5));
		list2.Add(new ParamCustomTestBase.NameAndID("口", 4));
		list2.Add(new ParamCustomTestBase.NameAndID("首", 6));
		list2.Add(new ParamCustomTestBase.NameAndID("胸", 7));
		list2.Add(new ParamCustomTestBase.NameAndID("左乳首", 22));
		list2.Add(new ParamCustomTestBase.NameAndID("右乳首", 23));
		list2.Add(new ParamCustomTestBase.NameAndID("左肩", 25));
		list2.Add(new ParamCustomTestBase.NameAndID("右肩", 26));
		list2.Add(new ParamCustomTestBase.NameAndID("左腕", 10));
		list2.Add(new ParamCustomTestBase.NameAndID("右腕", 11));
		list2.Add(new ParamCustomTestBase.NameAndID("左手首", 8));
		list2.Add(new ParamCustomTestBase.NameAndID("右手首", 9));
		list2.Add(new ParamCustomTestBase.NameAndID("左手", 27));
		list2.Add(new ParamCustomTestBase.NameAndID("右手", 28));
		list2.Add(new ParamCustomTestBase.NameAndID("左人差指", 12));
		list2.Add(new ParamCustomTestBase.NameAndID("右人差指", 13));
		list2.Add(new ParamCustomTestBase.NameAndID("左中指", 14));
		list2.Add(new ParamCustomTestBase.NameAndID("右中指", 15));
		list2.Add(new ParamCustomTestBase.NameAndID("左薬指", 16));
		list2.Add(new ParamCustomTestBase.NameAndID("右薬指", 17));
		list2.Add(new ParamCustomTestBase.NameAndID("腰", 24));
		list2.Add(new ParamCustomTestBase.NameAndID("左脚", 18));
		list2.Add(new ParamCustomTestBase.NameAndID("右脚", 19));
		list2.Add(new ParamCustomTestBase.NameAndID("左足首", 20));
		list2.Add(new ParamCustomTestBase.NameAndID("右足首", 21));
		this.sel_acceAttach.Setup(list2.ToArray());
		for (ACCESSORY_TYPE accessory_TYPE = ACCESSORY_TYPE.HEAD; accessory_TYPE < ACCESSORY_TYPE.NUM; accessory_TYPE++)
		{
			int num = (int)accessory_TYPE;
			this.sel_acceItems[num] = new ParamCustomTestBase.ItemSelectionSet();
			this.sel_acceItems[num].Setup<AccessoryData>(CustomDataManager.GetAccessoryDictionary(accessory_TYPE));
		}
	}

	// Token: 0x040009AC RID: 2476
	public ParamCustomTestBase.ItemSelectionSet sel_acceType = new ParamCustomTestBase.ItemSelectionSet();

	// Token: 0x040009AD RID: 2477
	public ParamCustomTestBase.ItemSelectionSet sel_acceAttach = new ParamCustomTestBase.ItemSelectionSet();

	// Token: 0x040009AE RID: 2478
	public ParamCustomTestBase.ItemSelectionSet[] sel_acceItems = new ParamCustomTestBase.ItemSelectionSet[12];

	// Token: 0x02000177 RID: 375
	public class NameAndID
	{
		// Token: 0x060009B4 RID: 2484 RVA: 0x00039258 File Offset: 0x00037458
		public NameAndID()
		{
		}

		// Token: 0x060009B5 RID: 2485 RVA: 0x00039260 File Offset: 0x00037460
		public NameAndID(string name, int id)
		{
			this.name = name;
			this.id = id;
		}

		// Token: 0x040009AF RID: 2479
		public string name;

		// Token: 0x040009B0 RID: 2480
		public int id;
	}

	// Token: 0x02000178 RID: 376
	public class ItemSelectionSet
	{
		// Token: 0x1700012F RID: 303
		// (get) Token: 0x060009B7 RID: 2487 RVA: 0x00039280 File Offset: 0x00037480
		// (set) Token: 0x060009B8 RID: 2488 RVA: 0x00039288 File Offset: 0x00037488
		public string[] names { get; protected set; }

		// Token: 0x060009B9 RID: 2489 RVA: 0x00039294 File Offset: 0x00037494
		public void Setup<T_Data>(Dictionary<int, T_Data> datas) where T_Data : ItemDataBase
		{
			this.list = new List<ParamCustomTestBase.NameAndID>();
			this.id_map = new Dictionary<int, int>();
			this.names = new string[datas.Count];
			if (datas != null)
			{
				foreach (KeyValuePair<int, T_Data> keyValuePair in datas)
				{
					int count = this.list.Count;
					this.id_map.Add(keyValuePair.Key, count);
					this.names[count] = keyValuePair.Value.name;
					this.list.Add(new ParamCustomTestBase.NameAndID(keyValuePair.Value.name, keyValuePair.Key));
				}
			}
		}

		// Token: 0x060009BA RID: 2490 RVA: 0x00039374 File Offset: 0x00037574
		public void Setup(ParamCustomTestBase.NameAndID[] setList)
		{
			this.list = new List<ParamCustomTestBase.NameAndID>();
			this.id_map = new Dictionary<int, int>();
			this.names = new string[setList.Length];
			if (setList != null)
			{
				foreach (ParamCustomTestBase.NameAndID nameAndID in setList)
				{
					int count = this.list.Count;
					this.id_map.Add(nameAndID.id, count);
					this.names[count] = nameAndID.name;
					this.list.Add(new ParamCustomTestBase.NameAndID(nameAndID.name, nameAndID.id));
				}
			}
		}

		// Token: 0x060009BB RID: 2491 RVA: 0x00039410 File Offset: 0x00037610
		public int SelectNoToID(int select)
		{
			if (select == -1)
			{
				return -1;
			}
			return this.list[select].id;
		}

		// Token: 0x060009BC RID: 2492 RVA: 0x0003942C File Offset: 0x0003762C
		public int IDToSelectNo(int id)
		{
			int result = -1;
			if (this.id_map.TryGetValue(id, out result))
			{
				return result;
			}
			return -1;
		}

		// Token: 0x040009B1 RID: 2481
		private List<ParamCustomTestBase.NameAndID> list;

		// Token: 0x040009B2 RID: 2482
		private Dictionary<int, int> id_map;
	}
}
